package cn.net.shuxing.yifu.mysiteforme.admin.controller;

import cn.net.shuxing.yifu.common.bean.User;
import cn.net.shuxing.yifu.common.service.UserCommonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {

    @Autowired
    private UserCommonService userCommonService;

    @RequestMapping(value = "/user/register",method = RequestMethod.POST)
    public User registerUser(String username, String password, Integer registerType)
    {
        User user = userCommonService.register(username,password,registerType);
        return user;
    }
}
